package cn.stylefeng.guns.modular.hx.order.mapper;

import cn.stylefeng.guns.modular.hx.order.entity.HxOrderOutDetailed;
import cn.stylefeng.guns.modular.hx.order.model.params.HxOrderOutDetailedParam;
import cn.stylefeng.guns.modular.hx.order.model.params.HxOrderOutParam;
import cn.stylefeng.guns.modular.hx.order.model.result.HxOrderOutDetailedResult;
import cn.stylefeng.guns.modular.hx.storage.model.params.HxStorageStockParam;
import cn.stylefeng.guns.modular.hx.storage.model.result.HxStorageStockResult;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 出库订单明细表 Mapper 接口
 * </p>
 *
 * @author zhucx
 * @since 2023-08-30
 */
public interface HxOrderOutDetailedMapper extends BaseMapper<HxOrderOutDetailed> {

    /**
     * 获取列表
     *
     * @author zhucx
     * @Date 2023-08-30
     */
    List<HxOrderOutDetailedResult> customList(@Param("paramCondition") HxOrderOutDetailedParam paramCondition);

    /**
     * 获取map列表
     *
     * @author zhucx
     * @Date 2023-08-30
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") HxOrderOutDetailedParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author zhucx
     * @Date 2023-08-30
     */
    Page<HxOrderOutDetailedResult> customPageList(@Param("page") Page page, @Param("paramCondition") HxOrderOutDetailedParam paramCondition, @Param("condition") String condition);

    /**
     * 获取分页map列表
     *
     * @author zhucx
     * @Date 2023-08-30
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") HxOrderOutDetailedParam paramCondition);

	boolean saveBatchList(@Param("list")List<HxOrderOutDetailedParam> list);


	List<HxOrderOutDetailedResult> findSumByOrders(@Param("paramCondition")HxOrderOutParam hxOrderOutParam);

	HxStorageStockResult findStockSumBySpec(@Param("paramCondition")HxStorageStockParam stockParam);

    List<HxStorageStockResult> findStockSumList(@Param("paramCondition")HxStorageStockParam stockParam);

	HxStorageStockResult findStockBySpec(@Param("paramCondition")HxStorageStockParam stockParam);

    List<HxStorageStockResult> findStockListBySpec(@Param("paramCondition")HxStorageStockParam stockParam);

	void deleteBySpec(@Param("paramCondition")HxOrderOutDetailedParam detailedParam);

	void deletebyorders(@Param("list")List<String> deletedlist);

	List<HxOrderOutDetailedResult> finddtjListBySpec(@Param("paramCondition")HxOrderOutDetailedParam detailedParam);

}
